<template>
	<div>
		父组件
		<Sub
			v-bind:str.sync="str"
			v-on:setCount="setCount"
			v-bind:count="count"
		></Sub>
	</div>
</template>
<script>
import Sub from './Sub'
export default {
	data() {
		return {
			str: '嚣张',
			count: 100,
		}
	},
	methods: {
		setCount(newValue) {
			this.count = newValue
		},
	},
	components: { Sub },
}
</script>